<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	request.setCharacterEncoding("UTF-8");
	String cp = request.getContextPath(); 
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="<%=cp%>/data/js/jquery-1.8.2.min.js"></script>
<script type="text/javascript">
function sendIt() {
    f = document.myForm;
	
	if(f.mode.value == "created"){
		alert("created");
		f.action = "<%=cp%>/admin/tourCreated.action";
	}else if(f.mode.value == "updated"){
		alert("updated");
		f.action = "<%=cp%>/admin/tourUpdated.action";
	}
	
    f.submit();
}
</script>
</head>
<body>

<div>
  <form name="myForm" method="post" enctype="multipart/form-data">
  	<p>나라지역번호 1: 유럽 , 2: 일본/중국  , 3:  미주/괌사이판 , 4 : 동남아 <br/>
        <input type="text" name="naraNo" id="naraNo" value="${dto.naraNo}" />
	<br />
    나라이름 (String) ex)프랑스,영국,한국,일본,미국 등등..
        <input type="text" name="area" id="area" value="${dto.area}" />
    <br />
    루트 그룹 : 인천_도쿄 , 도쿄_인천
        <input type="text" name="routeG" id="routeG" value="${dto.routeG}" />
    <br />
    여행 기간 : 
        <input type="text" name="dateNal" id="dateNal" value="${dto.dateNal}" />
    <br />
    (한국출발-현지도착)(int)
        <input type="text" name="startRoute" id="startRoute" value="${dto.startRoute}"/>
	<br />
    (현지출발-한국도착)(int)
        <input type="text" name="endRoute" id="endRoute" value="${dto.endRoute}" />
	<br />
      예약 최대인원(default 30) 
        <input type="text" name="maxInwon" id="maxInwon"  value="${dto.maxInwon}"/>
      <br />
      최소 출발인원(default 2) 
        <input type="text" name="minInwon" id="minInwon" value="${dto.minInwon}"/>
      <br />
    상품가격(int)
        <input type="text" name="price" id="price" value="${dto.price}"/>
    <br />
    호텔명(int)
      <input type="text" name="hotel" id="hotel" value="${dto.hotel}"/>
    <br />
      --board관련<br />
      여행상품 제목(String)
        <input type="text" name="subject" id="subject" value="${dto.subject}" />
      <br />
      여행상품 상세 설명(String)
        <input type="text" name="memo" id="memo" value="${dto.memo}"/>
      <br />
  	 여행상품 이미지 (file)<br/>
  	<input type="file" name="upload" id="upload" size="58" maxlength="100" style="height: 20px;"/><br/>
  	
       여행상품 내용(String)<br/>
  	    <textarea name="content" id="content" cols="45" rows="10">${dto.content}</textarea>
   	
   	 <input type="hidden" name="mode" value="${mode}"/>
     <input type="hidden" name="image" value="${dto.image}"/> 
   	
   	 <c:if test="${mode == 'created'}">
    <input type="submit" value="인설트"  
    onclick="javascript:location.href='<%=cp%>/admin/tourCreated.action?tourNo=${dto.tourNo}';"/>
    </c:if>
    <c:if test="${mode == 'updated'}">
    <input type="submit" value="업데이트"  
    onclick="javascript:location.href='<%=cp%>/admin/tourUpdated.action?tourNo=${dto.tourNo}';"/>
    </c:if>
  </form>
</div>

</body>
</html>